import request from '@/utils/request'

// 获取分类列表
export function getCategoryListAPI (params) {
  return request({
    url: '/category/page',
    method: 'get',
    params
  })
}
// 添加接口
export function addCategoryAPI (data) {
  return request({
    url: '/category',
    method: 'post',
    data
  })
}
// 编辑接口
export function editCategoryAPI (data) {
  return request({
    url: '/category',
    method: 'put',
    data
  })
}
// 删除接口
export function delCategoryAPI (id) {
  return request({
    url: `/category?id=${id}`,
    method: 'delete'
  })
}
